
/* Generated by Interface Builder */

#import "AdderView.h"
#import <appkit/Control.h>
#import <appkit/Form.h>
#import <dpsclient/wraps.h>

@implementation AdderView

- setSendOutput:anObject
{
    sendOutput = anObject;
    return self;
}

- input1:sender
{
    in1 = [sender floatValue];
    sum = in1 + in2;
    [sendOutput setFloatValue:sum];
    [self display];
    return self;
}

- input2:sender
{
    in2 = [sender floatValue];
    sum = in1 + in2;
    [sendOutput setFloatValue:sum];
    [self display];
    return self;
}

- drawSelf:(NXRect*)r :(int)c
{
    NXEraseRect(&bounds);
    PSsetgray(NX_BLACK);
    PSnewpath();
      PSsetlinewidth(in1*5.0);
      PSmoveto(0.0, bounds.size.height/2.0);
      PSlineto(bounds.size.width, bounds.size.height/2.0);
    PSstroke();
    PSnewpath();
      PSsetlinewidth(in2*5.0);
      PSmoveto(bounds.size.width/2.0, 0.0);
      PSlineto(bounds.size.width/2.0, bounds.size.height);
    PSstroke();
    return self;
}


@end
